﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mengsk.ProxyDelivery.Print.Domain
{
    [Serializable]
    public class PrintTemplateCompany
    {
        public string DeliveryCompany { get; set; }

        public string Title { get; set; }

        public override bool Equals(object obj)
        {
            PrintTemplateCompany other = obj as PrintTemplateCompany;
            if (other == null)
            {
                return false;
            }

            return this.DeliveryCompany == other.DeliveryCompany && this.Title == other.Title;
        }

        public override int GetHashCode()
        {
            int hashcode = 0;
            if (string.IsNullOrEmpty(this.DeliveryCompany) == false)
            {
                hashcode += this.DeliveryCompany.GetHashCode();
            }

            if (string.IsNullOrEmpty(this.Title) == false)
            {
                hashcode += this.Title.GetHashCode();
            }

            return hashcode;
        }
    }
}
